#define _CRT_SECURE_NO_WARNINGS 1

int FirstNotRepeatingChar(char* str) {
    int len = strlen(str);
    int count['z' - 'A' + 1] = { 0 };
    for (int i = 0; i < len; ++i)
    {
        count[str[i] - 'A']++;
    }
    for (int i = 0; i < len; ++i)
    {
        if (1 == count[str[i] - 'A'])
            return i;
    }
    return -1;
}